using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_UIComposite_DataGridColumn_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.UIComposite.DataGridColumn);
            args = new Type[]{};
            method = type.GetMethod("CreateEnity", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, CreateEnity_0);

            field = type.GetField("width", flag);
            app.RegisterCLRFieldGetter(field, get_width_0);
            app.RegisterCLRFieldSetter(field, set_width_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_width_0, AssignFromStack_width_0);
            field = type.GetField("Head", flag);
            app.RegisterCLRFieldGetter(field, get_Head_1);
            app.RegisterCLRFieldSetter(field, set_Head_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Head_1, AssignFromStack_Head_1);
            field = type.GetField("mod", flag);
            app.RegisterCLRFieldGetter(field, get_mod_2);
            app.RegisterCLRFieldSetter(field, set_mod_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_mod_2, AssignFromStack_mod_2);
            field = type.GetField("datas", flag);
            app.RegisterCLRFieldGetter(field, get_datas_3);
            app.RegisterCLRFieldSetter(field, set_datas_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_datas_3, AssignFromStack_datas_3);
            field = type.GetField("itemCreator", flag);
            app.RegisterCLRFieldGetter(field, get_itemCreator_4);
            app.RegisterCLRFieldSetter(field, set_itemCreator_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_itemCreator_4, AssignFromStack_itemCreator_4);
            field = type.GetField("buf", flag);
            app.RegisterCLRFieldGetter(field, get_buf_5);
            app.RegisterCLRFieldSetter(field, set_buf_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_buf_5, AssignFromStack_buf_5);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.UIComposite.DataGridColumn());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.UIComposite.DataGridColumn[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* CreateEnity_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.UIComposite.DataGridColumn instance_of_this_method = (huqiang.UIComposite.DataGridColumn)typeof(huqiang.UIComposite.DataGridColumn).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.CreateEnity();

            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


        static object get_width_0(ref object o)
        {
            return ((huqiang.UIComposite.DataGridColumn)o).width;
        }

        static StackObject* CopyToStack_width_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DataGridColumn)o).width;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_width_0(ref object o, object v)
        {
            ((huqiang.UIComposite.DataGridColumn)o).width = (System.Single)v;
        }

        static StackObject* AssignFromStack_width_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @width = *(float*)&ptr_of_this_method->Value;
            ((huqiang.UIComposite.DataGridColumn)o).width = @width;
            return ptr_of_this_method;
        }

        static object get_Head_1(ref object o)
        {
            return ((huqiang.UIComposite.DataGridColumn)o).Head;
        }

        static StackObject* CopyToStack_Head_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DataGridColumn)o).Head;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Head_1(ref object o, object v)
        {
            ((huqiang.UIComposite.DataGridColumn)o).Head = (System.String)v;
        }

        static StackObject* AssignFromStack_Head_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @Head = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.DataGridColumn)o).Head = @Head;
            return ptr_of_this_method;
        }

        static object get_mod_2(ref object o)
        {
            return ((huqiang.UIComposite.DataGridColumn)o).mod;
        }

        static StackObject* CopyToStack_mod_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DataGridColumn)o).mod;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_mod_2(ref object o, object v)
        {
            ((huqiang.UIComposite.DataGridColumn)o).mod = (huqiang.Data.FakeStruct)v;
        }

        static StackObject* AssignFromStack_mod_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.Data.FakeStruct @mod = (huqiang.Data.FakeStruct)typeof(huqiang.Data.FakeStruct).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.DataGridColumn)o).mod = @mod;
            return ptr_of_this_method;
        }

        static object get_datas_3(ref object o)
        {
            return ((huqiang.UIComposite.DataGridColumn)o).datas;
        }

        static StackObject* CopyToStack_datas_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DataGridColumn)o).datas;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_datas_3(ref object o, object v)
        {
            ((huqiang.UIComposite.DataGridColumn)o).datas = (System.Collections.Generic.List<huqiang.UIComposite.DataGridItemContext>)v;
        }

        static StackObject* AssignFromStack_datas_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Collections.Generic.List<huqiang.UIComposite.DataGridItemContext> @datas = (System.Collections.Generic.List<huqiang.UIComposite.DataGridItemContext>)typeof(System.Collections.Generic.List<huqiang.UIComposite.DataGridItemContext>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.DataGridColumn)o).datas = @datas;
            return ptr_of_this_method;
        }

        static object get_itemCreator_4(ref object o)
        {
            return ((huqiang.UIComposite.DataGridColumn)o).itemCreator;
        }

        static StackObject* CopyToStack_itemCreator_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DataGridColumn)o).itemCreator;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_itemCreator_4(ref object o, object v)
        {
            ((huqiang.UIComposite.DataGridColumn)o).itemCreator = (huqiang.UIComposite.ModelConstructor)v;
        }

        static StackObject* AssignFromStack_itemCreator_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.UIComposite.ModelConstructor @itemCreator = (huqiang.UIComposite.ModelConstructor)typeof(huqiang.UIComposite.ModelConstructor).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.DataGridColumn)o).itemCreator = @itemCreator;
            return ptr_of_this_method;
        }

        static object get_buf_5(ref object o)
        {
            return ((huqiang.UIComposite.DataGridColumn)o).buf;
        }

        static StackObject* CopyToStack_buf_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.DataGridColumn)o).buf;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_buf_5(ref object o, object v)
        {
            ((huqiang.UIComposite.DataGridColumn)o).buf = (huqiang.Data.QueueBuffer<huqiang.UIComposite.DataGridItem>)v;
        }

        static StackObject* AssignFromStack_buf_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.Data.QueueBuffer<huqiang.UIComposite.DataGridItem> @buf = (huqiang.Data.QueueBuffer<huqiang.UIComposite.DataGridItem>)typeof(huqiang.Data.QueueBuffer<huqiang.UIComposite.DataGridItem>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.DataGridColumn)o).buf = @buf;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.UIComposite.DataGridColumn();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
